<?php
namespace common\entities\budget;

use common\entities\ContractEntity;

/**
 * This is the model class for table "myscrm_budget".
 *
 * @property string $budgetId
 * @property string $CreatedOn
 * @property string $CreatedBy
 * @property string $year
 * @property string $month
 * @property string $appCode
 * @property string $money
 */
class BudgetEntity extends ContractEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_budget';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['budgetId', 'CreatedOn', 'CreatedBy', 'year', 'month', 'appCode'], 'required'],
            [['CreatedOn'], 'safe'],
            [['money'], 'number'],
            [['budgetId', 'CreatedBy'], 'string', 'max' => 36],
            [['year', 'month', 'appCode'], 'string', 'max' => 50]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'budgetId' => '唯一ID',
            'CreatedOn' => '创建时间',
            'CreatedBy' => '创建人',
            'year' => '年份',
            'month' => '月份',
            'appCode' => '应用code',
            'money' => '预算值',
        ];
    }
}